<template>
  <div class="section-wrap">
    <div class="form-section">
      <div class="form-item form-item-style1">
        <div class="label-title">
          <label>证件名称</label>
        </div>
        <group>
          <div>
            <input type="text" disabled
                   v-model="listArr.PaperName">
          </div>
        </group>
      </div>
      <div class="form-item form-item-style1">
        <div class="label-title">
          <label>证件编号</label>
        </div>
        <group>
          <div>
            <input type="text" disabled
                   v-model="listArr.PaperCode">
          </div>
        </group>
      </div>
      <div class="form-item form-item-style1">
        <div class="label-title">
          <label>发证单位</label>
        </div>
        <group>
          <div>
            <input type="text" disabled
                   v-model="listArr.ProvideOffice">
          </div>
        </group>
      </div>
      <div class="form-item form-item-style1">
        <div class="label-title">
          <label>发证日期</label>
        </div>
        <group>
          <div>
            <input type="text" disabled
                   v-model="listArr.PaperDate">
          </div>
        </group>
      </div>
      <div class="form-item form-item-style1">
        <div class="label-title">
          <label>有效期</label>
        </div>
        <group>
          <div>
            <input type="text" disabled
                   v-model="listArr.ValidateTo">
          </div>
        </group>
      </div>
      <div class="form-item-style2">
        <div >
          <label >附件</label>
        </div>
          <div>
            <img :src="listArr.Photo" v-if="listArr.Photo"
                 alt="">
            <img src="../../../assets/nopic.png" v-else
                 alt="">
          </div>
      </div>
      <myMenu></myMenu>
    </div>
  </div>
</template>

<script type="text/javascript">
  import upload from '../../../commonComponents/upload/index2'
  import {Tab, TabItem} from 'vux'
  import {paperDetail} from '@/api/api'
  import myMenu from '@/commonComponents/menu'

  export default {
    components: {
      Tab,
      TabItem,
      upload,
      myMenu
    },
    data () {
      return {
        listArr: {},
        param: {
          allowPaging: true,
          data: {
            id: 'c4a59478-1bd7-4b55-bebd-37201ed4c84a'
          },
          pageIndex: 0,
          pageSize: 1000
        }
      }
    },
    created () {
      this.param.data.id = this.$route.query.id
    },
    mounted () {
      this.dataArr()
    },
    methods: {
      // 主要数据
      dataArr () {
        paperDetail(this.param).then((res) => {
          console.log(res, 123)
          if (res.code === 0) {
            this.listArr = res.data
          }
        })
      }
    }
  }
</script>
<style lang="less" scoped>
  .form-item-style2{
    padding-left:20px;
    label{
      font-size:14px;
      color:#666;
      font-weight: bold
    }
    img{
      margin-right:10px;
      margin-top:10px;
      width:86px;
      height:80px;
    }
  }
</style>
